Skip to content

[skip changelog] Specify that includes field items should be in library #1305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021
Merged

[skip changelog] Specify that includes field items should be in library #1305

merged 1 commit into from
Jun 3, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 2, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

Docs update

  • What is the current behavior?

The library.properties includes field specifies a custom list of files to be added to the sketch by the IDE as #include directives. Library authors sometimes add filenames from library dependencies to this field. However, that doesn't make any sense because all Arduino development software versions with support for the includes field also have support for resolution of the dependencies of libraries, meaning that there is no need for these library dependency #include directives to be placed in the sketch.

For this reason, Arduino Lint rule LP052 ("library.properties includes field item(s) not found in library.") was configured to be an error when the tool's compliance setting is at the default "specification" level.

The required rules in "specification" mode are intended to match the official Arduino Library Specification, however, the is currently no mention in the Arduino Library Specification of any restrictions on the contents of the library.properties includes field.

  • What is the new behavior?

The Arduino Library Specification's documentation of the includes field mentions that it should contain files of the library itself.

Since this requirement is fairly common sense, and the format of the library.properties fields documentation somewhat
constraining, I attempted to document it with minimal verbosity.

Not a breaking change.

…rary

The library.properties `includes` field specifies a custom list of files to be added to the sketch by the IDE as
`#include` directives. Library authors sometimes add filenames from library dependencies to this field. However, that
doesn't make any sense because all Arduino development software versions with support for the `includes` field have also
had support for resolution of the dependencies of libraries, meaning that there is no need for these `#include`
directives to be placed in the sketch.

For this reason, Arduino Lint rule LP052 ("library.properties includes field item(s) not found in library.") was
configured as an error when the tool is in the default "specification" compliance mode. Since the required rules in this
mode are intended to match the official Arduino Library Specification, it is important that mention be made in the
`includes` field that it should contain files of the library itself.

Since this requirement is fairly common sense, and the format of the library.properties fields documentation somewhat
constraining, I attempted to document it with minimal verbosity.
@per1234 per1234 added type: bug topic: documentation Related to documentation for the project labels Jun 2, 2021
@per1234 per1234 requested review from ubidefeo, umbynos and rsora June 2, 2021 11:53
@per1234 per1234 merged commit b8d8a9c into arduino:master Jun 3, 2021
@per1234 per1234 deleted the document-includes-requirement branch June 3, 2021 08:50
@per1234 per1234 self-assigned this Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants